package com.millstein.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.millstein.model.AddressDO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * @description:
 * @author: tsing
 * @create: 2021-09-14 11:15
 */
@Data
@NoArgsConstructor
public class AddressVO {

    private Long id;

    /**
     * 是否默认收货地址：0->否；1->是
     */
    @JsonProperty("default_status")
    private Integer defaultStatus;

    /**
     * 收发货人姓名
     */
    @JsonProperty("receive_name")
    private String receiveName;

    /**
     * 收货人电话
     */
    private String phone;

    /**
     * 省/直辖市
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String region;

    /**
     * 详细地址
     */
    @JsonProperty("detail_address")
    private String detailAddress;

    public AddressVO(AddressDO addressDO) {
        BeanUtils.copyProperties(addressDO, this);
    }
}
